export const SYSTEM_KEY = 'yumc';
export const BASE_URL = '/crmconsole/crm/console';
export const LOGIN_PATH = '/user/login';
export const WEEK = ['日', '一', '二', '三', '四', '五', '六'];
export const DEFAULT_PAGE_CONFIG: TPageType = { current: 1, pageSize: 10, total: 0 };

// 初始化数据key，[城市列表]
export const DISTRICT_KEY = 'districtMap';
export const MENU_KEY = 'menuMap';
export const ACTION_KEY = 'actionMap';
export const MERCHANT_KEY = 'merchantMap';
export const INIT_DATA_KEY = [MENU_KEY, ACTION_KEY, DISTRICT_KEY, MERCHANT_KEY];

// 1:正式，2：体验版本，3：开发版本
export const ENV_ENUM = {
  prod: 1, // 正式版本
  uat: 2, // 体验版本
  dev: 3, // 开发版本
};

// 餐期
export const PERIOD_DATA: { name: string; value: number }[] = [
  {
    name: '早餐',
    value: 1,
  },
  {
    name: '午餐',
    value: 2,
  },
  {
    name: '下午茶',
    value: 3,
  },
  {
    name: '晚餐',
    value: 4,
  },
  {
    name: '夜宵',
    value: 5,
  },
];

// 门店类型
export const STORE_TYPE: TLabelValueData[] = [
  {
    label: '直营店',
    value: '1',
  },
  {
    label: '加盟店',
    value: '2',
  },
  {
    label: '机场店',
    value: '3',
  },
];
// 渠道类型
export const CHANNEL_TYPE: TLabelValueData[] = [
  {
    label: '火锅店扫码',
    value: 1,
  },
  {
    label: '自取',
    value: 2,
  },
  {
    label: '外送',
    value: 3,
  },
  {
    label: '小铺扫码',
    value: 4,
  },
];
// 发布状态字典
export const PUBLISH_STATUS_ENUM = {
  0: { text: '草稿' },
  1: { text: '待发布', status: '#DE5F0A' },
  2: { text: '测试发布' },
  3: { text: '正式发布', status: '#28A281' },
  4: { text: '停用' },
  5: { text: '已过期', status: '#CD5F5F' },
};
export const PUBLISH_STATUS_COLOR = [
  '#323232',
  '#DE5F0A',
  '#323232',
  '#28A281',
  '#323232',
  '#CD5F5F',
];

// 图片上传文件目录
export const UPLOAD_FOLDER = {
  USER: 'user', // 用户
  MEMBER: 'member', // 会员
  MERCHANT: 'merchant', // 商户
  COUPON: 'coupon', // 券
  RESOURCE: 'res', //菜单资源
  RECRUIT: 'recruit', // 新人活动
  SHAREINFO: 'shareinfo', // 小程序默认分享
  PRODUCT: 'product', // 商品管理
  LOTTERYDRAW: 'lotterydraw', //抽奖活动
};

// 性别映射
export const SEX_ENUM = {
  0: { text: '女' },
  1: { text: '男' },
};

// 领券活动类型映射
export const COUPON_ACTIVITY_ENUM = {
  0: { text: '普通领券' },
  1: { text: '口令领券' },
};

export const WEEK_DATE = [
  { value: 0, name: '周日' },
  { value: 1, name: '周一' },
  { value: 2, name: '周二' },
  { value: 3, name: '周三' },
  { value: 4, name: '周四' },
  { value: 5, name: '周五' },
  { value: 6, name: '周六' },
];

export const PRODUCT_RANGE_TYPE = {
  0: { text: '全部餐品（除周边）(商品用)' },
  1: { text: '全部商品（含周边）(订单/配送用)' },
  2: { text: '仅周边商品 (订单/配送用)' },
  3: { text: '全部' },
  4: { text: '按类目' },
  5: { text: '按类别' },
  6: { text: '按商品' },
  7: { text: '导入模板' },
};

export const PAY_TYPE = {
  1: { text: '微信', status: 1 },
  2: { text: '支付宝', status: 2 },
};

export const ORDER_STATUS_TYPE = {
  1: { text: '待支付', status: 1 },
  2: { text: '下单成功', status: 2 },
  3: { text: '餐食制作中', status: 3 },
  4: { text: '待取餐', status: 4 },
  5: { text: '订单已完成', status: 5 },
  6: { text: '订单已取消', status: 6 },
  7: { text: '订单已过期', status: 7 },
  8: { text: '退款中', status: 8 },
  10: { text: '已退款', status: 10 },
};

export const ORDER_TYPE = {
  1: { text: '自取', status: 1 },
  2: { text: '堂食', status: 2 },
};

export const APPLY_TYPE = {
  0: { text: '未申请' },
  1: { text: '申请中' },
  2: { text: '申请成功' },
  3: { text: '申请失败' },
};

export const SHOP_OPTIONS = [
  {
    id: '1',
    type: '固定商品',
    tip: '例：固定商品客户不允许选择',
  },
  {
    id: '2',
    type: '可选商品',
    tip: '例：N种商品选N件',
  },
];

export const baseRadioOptions = [
  { label: '否', value: 0 },
  { label: '是', value: 1 },
];

// 消费积分类型
export const POINTS_TYPE_ENUM = {
  1: { text: '通用消费积分' },
  2: { text: '生日消费积分' },
};

export const SENDTYPE = {
  1: '消费满一定金额发放',
  2: '消费每满一定金额发放',
};

export const USETYPE = {
  1: '所有会员',
  2: '使用会员等级',
};

export const POINTRULETYPE = {
  1: '按照比例',
  2: '按照固定金额',
};

export const INDATE = {
  '-1': '永久',
  '365': '按年',
  '30': '按月',
};

export const BIRTHDAYEFFECTIVE = [
  {
    value: 1,
    label: '生日当月',
  },
  {
    value: 2,
    label: '生日当天',
  },
];

export const BIRTHDAYSENDRULE = [
  {
    value: 1,
    label: '每笔订单发放',
  },
  {
    value: 2,
    label: '首笔订单发放',
  },
];
